package com.hl.unittestlearn;

import android.app.Application;

import com.hl.unittestlearn.di.component.ApplicationComponent;
import com.hl.unittestlearn.di.component.DaggerApplicationComponent;
import com.hl.unittestlearn.di.module.ApplicationModule;


public class MyApplication extends Application {
    private static MyApplication instance;
    private ApplicationComponent applicationComponent;

    @Override
    public void onCreate() {
        super.onCreate();

        instance = this;
        applicationComponent = DaggerApplicationComponent.builder()
                .applicationModule(new ApplicationModule())
                .build();
    }

    public ApplicationComponent getApplicationComponent() {
        return applicationComponent;
    }

    public static MyApplication getInstance()
    {
        return instance;
    }
}
